<header class="main-header">
  <!-- Logo -->
  <a href="/admin" class="logo">
    <!-- mini logo for sidebar mini 50x50 pixels -->
    <span class="logo-mini">80</span>
    <!-- logo for regular state and mobile devices -->
    <span class="logo-lg">BALING MEDIA</span>
  </a>
  <!-- Header Navbar: style can be found in header.less -->
  <nav class="navbar navbar-static-top">
    <!-- Sidebar toggle button-->
    <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
      <span class="sr-only">Toggle navigation</span>
    </a>
    <div class="navbar-custom-menu">
      <ul class="nav navbar-nav">
        <!-- User Account: style can be found in dropdown.less -->
        <li class="user user-menu">
          <a href="{$Think.const.WEB_URL}" target="_blank">
            <span class="hidden-xs">网站首页</span>
          </a>
        </li>
        <li class="user user-menu">
          <a>
            <img src="/static/admin/images/avatar.png" class="user-image" alt="">
            <span class="hidden-xs">{$Think.session.username}</span>
          </a>
        </li>
        <!-- Control Sidebar Toggle Button -->
        <li class="dropdown tasks-menu">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <i class="fa fa-gears"></i>
          </a>
          <ul class="dropdown-menu settings">
            <li>
              <ul class="menu">
                <li>
                  <a href="javascript:;" onclick="editPwd();" class="btn-own">修改密码</a>
                </li>
                <li>
                  <a href="javascript:;" onclick="loginOut();" class="btn-own">退出</a>
                </li>
              </ul>
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
  <!-- sidebar: style can be found in sidebar.less -->
  <section class="sidebar">
    <!-- sidebar menu: : style can be found in sidebar.less -->
    <ul class="sidebar-menu">
       <li {if condition='$ctroname eq $thisctrl'}class="active"{/if}><a href="{:url('Main/index')}"><i class="fa fa-home"></i> <span>首页</span></a></li>
      {foreach name="newcollist" item="vo" key="k"}
        <li class="treeview {if condition='$ctroname eq $vo["controler"] && $ctroname neq $thisctrl'}active toplevel{/if}">
          {if condition='$vo["level"] eq 1'}
            <a href="#">
              <i class="fa {$vo.icon}"></i> <span>{$vo.name}</span>
              <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
            </a>
            <ul class="treeview-menu">
              {foreach name="vo.dlev" item="vo1"}
                <li {if condition='$requesturl eq $vo1["controler"] || $requesturl eq $vo1["controler"].".html"'}class='active downlevel'{/if}><a href="/home{$vo1["controler"]}"><i class="fa fa-circle-o"></i>{$vo1.name}</a></li>
          {/foreach}
          </ul>
        </li>
        {/if}
      {/foreach}
      
    </ul>
  </section>
  <!-- /.sidebar -->
</aside>